﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LogAnProjectUsingStubs
{
    public class LogAnalyzer
    {
        private IExtensionManager manager;

        public LogAnalyzer()
        {
            manager = new FileExtensionManager();
        }
        //property ile dependency ayari yapilir.
        public IExtensionManager ExtensionManager
        {
            get { return manager; }
            set { manager = value; }
        }
        public bool GecerliDosyaAdimi(string dosyaadi)
        {
            return manager.IsValid(dosyaadi);
        }
    }
    public class FileExtensionManager : IExtensionManager
    {
        public bool IsValid(string fileName)
        {
            throw new NotImplementedException();
        }
    }
    public interface IExtensionManager
    {
        bool IsValid(string fileName);
    }
}
